<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>McGill StarCraft II Club</title>
		<?php echo link_tag(base_url().'css/homepage.css'); ?>
	</head>
	<body>
		<div id="everything">
			<div id="header">
				<br/>
				<p>
				<?php
				$logged_in = $this->session->userdata('logged_in');
				if(!isset($logged_in) || !$logged_in){
					echo anchor('login', 'Login') . ' | ' . anchor('login/register', 'Register');
				}
				else{
					$account = $this->session->userdata('account');
					echo 'Welcome ' . $account . ' | ';
					if($this->gateway_model->check_access($account) == 'leader') echo anchor('homepage/control/', 'Website Control Panel') . ' | ';
					echo anchor('profile/show/' . $account, 'My Profile') . ' | ' . anchor('profile/edit/', 'Edit Profile') . ' | ' . anchor('login/logout', 'Logout');
				}
				?>
				</p>
			</div>
		<div id="middle">
			<div id="left_column">
				<div id="navigation">
					<?php
						echo anchor("homepage", 'Homepage');
						echo anchor("roster", 'About Us');
						echo anchor("ladder", 'Ladder');
						echo anchor("tournaments", 'Tournaments');
						echo anchor("gameslist", 'Ranked Games');
						echo anchor("forums", 'Forums');
						echo anchor("calendar", 'Calendar And Events');
					?>
				</div>

			</div>

			<div id="middle_column">

			<?php
				if(isset($subview)){
					$this->load->view($subview);
				} else {
					redirect('/news');
				}
			?>


			</div>

			<!-- right column is now gone <div id="right_column">


			</div>-->

			<br clear="all">

		</div>

		<div style="position: relative" id="footer">

			<div style="position: relative" id="subnav">
				<a href="http://www.facebook.com">Facebook</a> | <a href="#">Options</a> |
				<a href="<?php echo base_url(); ?>roster">Info</a> | <a href="#">Contact</a> | <a href="http://www.blizzard.com">Blizzard</a> |
				<a href="http://www.teamliquid.net">TeamLiquid</a>
			</div>

			<span class="copyright">
				Website under construction -- SEP Project
			</span>

		</div>


	</div>



	</body>

</html>
